import BaseView from "../../cfw/mvc/BaseView";
import ToastModel from "./ToastModel";


const { ccclass, property } = cc._decorator;

@ccclass
export default class ToastView extends BaseView {

    @property(cc.Label)
    label: cc.Label = null;

    @property(cc.Node)
    board_neon: cc.Node = null;

    protected model: ToastModel;
    start() {
        this.label.string = this.model.getContent()
        cc.tween(this.board_neon).by(1, { y: 200, opacity: 0 }).call(() => {
            this.hide()
        }).start()
    }


}
